<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="previous" href="Pretty.html">
<link rel="Up" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of class methods" rel=Appendix href="index_methods.html">
<link title="Index of classes" rel=Appendix href="index_classes.html">
<link title="Index of class types" rel=Appendix href="index_class_types.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Index of module types" rel=Appendix href="index_module_types.html">
<link title="Alpha" rel="Chapter" href="Alpha.html">
<link title="Cfg" rel="Chapter" href="Cfg.html">
<link title="Cil" rel="Chapter" href="Cil.html">
<link title="Cillower" rel="Chapter" href="Cillower.html">
<link title="Clist" rel="Chapter" href="Clist.html">
<link title="Dataflow" rel="Chapter" href="Dataflow.html">
<link title="Dominators" rel="Chapter" href="Dominators.html">
<link title="Errormsg" rel="Chapter" href="Errormsg.html">
<link title="Formatcil" rel="Chapter" href="Formatcil.html">
<link title="Pretty" rel="Chapter" href="Pretty.html">
<link title="Stats" rel="Chapter" href="Stats.html"><title>CIL API Documentation (version 1.7.3) : Stats</title>
</head>
<body>
<div class="navbar"><a href="Pretty.html">Previous</a>
&nbsp;<a href="index.html">Up</a>
&nbsp;</div>
<center><h1>Module <a href="type_Stats.html">Stats</a></h1></center>
<br>
<pre><span class="keyword">module</span> Stats: <code class="code">sig</code> <a href="Stats.html">..</a> <code class="code">end</code></pre>Utilities for maintaining timing statistics<br>
<hr width="100%">
<br><code><span id="TYPEtimerModeEnum"><span class="keyword">type</span> <code class="type"></code>timerModeEnum</span> = </code><table class="typetable">
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span class="constructor">Disabled</span></code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Do not collect timing information</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span class="constructor">SoftwareTimer</span></code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Use OCaml's <code class="code">Unix.time</code> for timing information</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr></table>


<pre><span id="VALreset"><span class="keyword">val</span> reset</span> : <code class="type"><a href="Stats.html#TYPEtimerModeEnum">timerModeEnum</a> -> unit</code></pre><div class="info">
Resets all the timings and specifies the method to use for future timings.
  Call this before doing any timing.<br>
</div>
<pre><span id="VALcountCalls"><span class="keyword">val</span> countCalls</span> : <code class="type">bool ref</code></pre><div class="info">
Flag to indicate whether or not to count the number of calls of
    to <a href="Stats.html#VALrepeattime"><code class="code">Stats.repeattime</code></a> or <a href="Stats.html#VALtime"><code class="code">Stats.time</code></a> for each label.
    (default: false)<br>
</div>
<pre><span id="VALtime"><span class="keyword">val</span> time</span> : <code class="type">string -> ('a -> 'b) -> 'a -> 'b</code></pre><div class="info">
Time a function and associate the time with the given string. If some
    timing information is already associated with that string, then accumulate
    the times. If this function is invoked within another timed function then
    you can have a hierarchy of timings<br>
</div>
<pre><span id="VALrepeattime"><span class="keyword">val</span> repeattime</span> : <code class="type">float -> string -> ('a -> 'b) -> 'a -> 'b</code></pre><div class="info">
repeattime is like time but runs the function several times until the total
    running time is greater or equal to the first argument. The total time is
    then divided by the number of times the function was run.<br>
</div>
<pre><span id="VALprint"><span class="keyword">val</span> print</span> : <code class="type">out_channel -> string -> unit</code></pre><div class="info">
Print the current stats preceeded by a message<br>
</div>
<pre><span id="VALlookupTime"><span class="keyword">val</span> lookupTime</span> : <code class="type">string -> float</code></pre><div class="info">
Return the cumulative time of all calls to <a href="Stats.html#VALtime"><code class="code">Stats.time</code></a> and
  <a href="Stats.html#VALrepeattime"><code class="code">Stats.repeattime</code></a> with the given label.<br>
</div>
<pre><span id="VALtimethis"><span class="keyword">val</span> timethis</span> : <code class="type">('a -> 'b) -> 'a -> 'b</code></pre><div class="info">
Time a function and set lastTime to the time it took<br>
</div>
<pre><span id="VALlastTime"><span class="keyword">val</span> lastTime</span> : <code class="type">float ref</code></pre></body></html>